Okay.
So in today's lesson we're going to have a look at dialogue.
Now dialogues are objects you can add in to your game, which allows you to make very simple interactions
with other characters.
Obviously not player characters, but NPCs.
And this is a really good way to bring life to your game.
And once I make them, once I show you an example, you'll probably recognize them and you'll go, ah,
yes, I've seen that in a game before.
I've seen it in this game or this game.
Okay.
So let's go back over to the home section.
I'm going to add in using one of my plugins, a character I'm going to add in myself.
So um.
Oh can't use can I use this one I can.
And that's not me.
There we go.
Add me in as our 15.
Um.
Okay.
It hasn't quite worked correctly.
Let's try again.
Um, maybe it's R6.
Okay, you can do, but I'd like, um.
There we go.
I know this one works.
Insert.
Um.
Cool.
Okay, so I've added myself in here, and I'm just going to move myself down.
Just like that bear.
Okay, so I'm going to inside, um, this model here, add in some dialogue.
So setup dialogue and there's a dialogue choice and there's dialogue.
So dialogue here um.
This one.
Basically think I'm going to set up quickly and just show you how it works.
So you have initial prompt and you have a goodbye dialogue.
So the initial prompt is, is what's the what is what you say to this character.
And the goodbye dialogue is what you want to say once you finish.
So I'm going to say hello.
This I'm going to say by in this one in use on purpose.
Help tone neutral trigger distance 100.
So we can see it very clearly.
And let's just quickly play this and see how it works.
So let's go over to it.
Um.
Oh, we can't quite see that.
Um.
Hmm.
Let's try to add it into the this part here for example.
So it's actually added it inside of a part.
There we go.
So he says hello here and we can then go from there, basically.
Um, he just keeps saying hello because I haven't set it up correctly just yet.
Okay.
So I'm going to talk through this maybe a bit more I think rushed through this a little bit.
So let's say it works based on the character's head.
So in here let's add in some um, a dialogue choice okay.
So dialogue works based on two ways.
Okay.
So you have a dialogue choice which basically once you've started this, um, you can then pick a couple
things to ask this character.
And then the character has set responses to give you back.
So um, user dialogue can say, um, hello, um, how do I play this game, for example?
Okay, so to start this conversation off, the user dialogue is what the user will say to this character.
So I'm saying to start off with hello, how do I play this game?
Um, the response here, um, would be something like I don't know, doesn't know how to play the game.
Okay.
Um, and then this the and I'm a goodbye dialogue is what you say once you want to finish the conversation.
So this could be something just like bye, for example.
Okay.
This dialogue choice goes into the, um, dialogue object here.
So we put this inside, um, like that there.
And we're going to say the initial prompt is just going to be hello or something like that.
And the goodbye dialogue is bye.
Okay.
So it's initially starting by saying hello and then it's finishing it by just saying goodbye.
Okay.
Um, let's just quickly try this out.
I think it works a bit more sense once I've got it all up and working.
So start off like this.
So you have to trigger the conversation to start working.
So let's click this.
It says hello and I have an option.
I can either say hello, how do I play this game.
Or I can say bye.
If I say bye, the conversation just ends like that there.
If I then kind of go back in in a little bit, it resets.
If I click this again, says hello to me and say hello, do I play this game?
Is it nice to play the game but we can have a good conversation with it?
Okay, so you start off with your dialogue.
That's something that's um, this character says and that your character has no response to, okay.
Once that dialogue is then finished, if you'd like to play to make a choice, you can add in a dialogue
choice which has the user pick which one they want.
And if you want multiple choices, you can just duplicate these dialogue choices.
So I could say this one might be, um, I don't know.
Um, what is your name?
For example.
And the response might be.
My name is your name because it's my character.
Okay, um, let's try this out.
So now if we go over to it, click on this.
It says hello.
What is your name?
Um.
And hello.
How do I play this game or goodbye.
Those are some weird responses there.
Um.
My name is your name doesn't help, but it's just a cool idea that you can add in.
And if you want to add further dialogue as well, um, you can add in a dialogue there.
And this is going to be um, for example, um, the initial prompt.
It doesn't make any sense.
And the response.
Um.
Initial prompts.
Purpose.
Okay.
See how it works.
Let's join in.
It to it.
Hello.
And how do I play this game?
I don't know, and it just goes from there.
Okay, so I think I did that.
Yeah.
So once you have so you have a initial dialogue which is the object of air that starts this.
And then from there you just add in dialogue choices inside of it.
And you can add in additional dialogue choice if you wanted to.
So you could obviously what is your name.
It could say, um, the response is, um, where are you from?
So no, the user dialogue is where are you from?
And the response is, I am where you are from.
Okay.
And then that's just by as well.
Okay.
And we can see how this would work with multiple if we go to conversation and we decide to say, um,
what is your name?
It will tell me that your name is my name.
And I can ask a further question.
I wanted to saying, where are you from?
And it doesn't help either.
Okay.
Just a random conversation.
I've thought of to think, but it's quite cool.
Okay, so I really like this dialogue.
Um, this dialogue object you can add in because it's what otherwise would have involved quite a bit
of scripting can be made very simple.
Okay, so if you don't fancy doing all the scripting and stuff involved and all the stuff involved for
this, then you can just use some dialogue and you can have different choices and things like that.
So for maybe like an open world game, um, think dialogue is a really good option because you can create
lots of interactions between different players or different the players and the NPCs.
Um, an important point as well.
In the dialogue, you can also change the purpose to help quest and shop and the tone to neutral enemy
and friendly.
To see how this works, let's change the purpose to a quest.
And let's change the tone to enemy, just to see how this might change our interactions.
Let's go over it.
And now we've got an exclamation mark and it's now all in red.
And just to give it a different theme and to show that this character, his enemy, is an enemy and
is not friendly.
Okay.
And where are you from and where are you from?
And then that's it there.
Okay, so really nice feature and I'd highly recommend that you add this into your game.
Um, only thing I might just say is that, um, you've probably seen this dialogue used elsewhere in
other games.
So if you want your game to have its own separate feel and not to be linked to other games, then you
probably don't want to use this feature.
Add.
Lots of other games have used it, so it's a good feature, but just make sure that it might, um,
make your game a bit more, a bit less, um, a bit less.
What am I going to use for?
Um, you might it might link to other games is in the play would probably seen that this kind of setup
has been done before.
So sometimes it's nice in a game to have your own stuff.
So it's just solely from you.
Okay.
But it is up to you what you want to do.
And I think personally I'll probably go for the using this dialogue is a very cool choice.
And also while doing this you can script certain areas as well.
So you you can there's certain events from dialogue choices that you can use, um, which can say if
a choose this choice then the boss battle is going to start, for example.
Okay, um, if you try to annoy the boss for example.
So again, just how it makes it a lot more simpler to do these things.
Okay.
So try that and also recommend maybe trying out some of the events that are required of these as well.
And join me in the next lesson.
We're going to have a look at another type of prompts which are proximity prompts.